package com.cx.support;

import java.util.function.BiFunction;

/**
 * Created on 2019-04-18 15:42.
 * @author 舒建辉
 */
public class ErrorAsNullBiFunction<Input> implements BiFunction<Input, Throwable, Input> {

    @Override
    public Input apply(Input input, Throwable throwable) {
        if (throwable != null) {
            return null;
        }
        return input;
    }
}